package com.itfreer.bpm.timeliness.service;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.itfreer.bpm.timeliness.dao.IProcessTimeLinessDao;
import com.itfreer.bpm.timeliness.entity.ProcessTimeLinessEntity;
import com.itfreer.form.api.BaseDao;
import com.itfreer.form.api.imp.BaseServiceImp;

/**
 * 流程时效数据访问服务层
 */
@Component
public class ProcessTimeLinessBaseService  extends BaseServiceImp<ProcessTimeLinessEntity> implements IProcessTimeLinessService {
	
	@Autowired
	private IProcessTimeLinessDao ProcessTimeLinessDao;
	@Override
	protected BaseDao<ProcessTimeLinessEntity> getDao() {
		return ProcessTimeLinessDao;
	}
	@Override
	public ProcessTimeLinessEntity getEntityBySexeid(String sexeid) {
		
		HashMap<String, Object> processsWhere=new HashMap<String, Object>();
		processsWhere.put("sexeid:=", sexeid);
		List<ProcessTimeLinessEntity>lst=this.ProcessTimeLinessDao.getEntitys(null, processsWhere, null, 1, 1);
		if(lst!=null && lst.size()>0) {
			return lst.get(0);
		}
		return null;
	}
	
}
